package com.ym.medical.domain.param;

import com.ym.common.constant.BeanCovert;
import static com.ym.common.constant.ValidRule.Add;
import static com.ym.common.constant.ValidRule.Update;
import com.ym.medical.domain.entity.SubjectReplyEntity;
import com.ym.common.annotations.CustomConstraint;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.ym.medical.enums.AuditStateEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;

/**
 * 主题回复对象 subject_reply
 *
 * @author ym
 * @date 2020-08-24
 */
@ApiModel("主题回复-修改")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SubjectReplyUpdateParam extends BeanCovert<SubjectReplyEntity>{

    @ApiModelProperty("主键")
    @NotNull(message = "主键不能为空", groups = {Add.class, Update.class})
    private Long id;

    @ApiModelProperty("用户(评论者)ID")
    @NotNull(message = "用户不能为空", groups = {Add.class, Update.class})
    private Long userId;

    @ApiModelProperty("主题ID")
    @NotNull(message = "主题ID不能为空", groups = {Add.class, Update.class})
    private Long subjectId;

    @ApiModelProperty("被回复ID(父级节点ID)")
    @NotNull(message = "被回复ID不能为空", groups = {Add.class, Update.class})
    private Long parentId;

    @ApiModelProperty("附件ID")
    @Size(max = 500, message = "附件ID长度超过{max}", groups = {Add.class, Update.class})
    private String attrId;

    @ApiModelProperty("回复内容")
    @Size(max = 3000, message = "回复内容长度超过{max}", groups = {Add.class, Update.class})
    private String content;

    @ApiModelProperty("审核人")
    private Long auditSb;

    @ApiModelProperty("审核时间")
    private Date auditTime;

    @Size(max = 2, message = "审核状态 长度超过{max}", groups = {Add.class, Update.class})
    @ApiModelProperty("审核状态 (01- 待审核 02-审核中 03-审核通过 04-审核未通过)")
    @CustomConstraint(AuditStateEnum.class)
    private String auditState;

    @ApiModelProperty("审核说明")
    @Size(max = 64, message = "审核说明长度超过{max}", groups = {Add.class, Update.class})
    private String auditRemark;

    @ApiModelProperty("点赞数")
    @NotNull(message = "点赞数不能为空", groups = {Add.class, Update.class})
    private Integer likeNum;

    @ApiModelProperty("回复时间")
    @NotNull(message = "回复时间不能为空", groups = Add.class)
    private Date createTime;

    @ApiModelProperty("更新时间")
    @NotNull(message = "更新时间不能为空", groups = {Add.class, Update.class})
    private Date updateTime;

    @ApiModelProperty("删除标志")
    @NotEmpty(message = "删除标志不能为空", groups = {Add.class, Update.class})
    @Size(max = 2, message = "删除标志长度超过{max}", groups = {Add.class, Update.class})
    private String deleted;

}
